package cn.lu.train.mvp.presenter.splash;

import cn.lu.train.entry.ResultData;
import cn.lu.train.mvp.model.Callback;
import cn.lu.train.mvp.model.DataModelManager;
import cn.lu.train.mvp.model.SplashModel;
import cn.lu.train.mvp.view.ISplashView;

public class SplashPresenter {
    private ISplashView view;

    public SplashPresenter(ISplashView view) {
        this.view = view;
    }

    public void getImgKey() {
        DataModelManager.create(SplashModel.class)
                .getSplashImgKey(new Callback<ResultData<Long>>() {
                    @Override
                    public void onSuccess(ResultData<Long> data) {
                        view.onGetImgKey(data.entry);
                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onComplete() {

                    }
                });
    }
}
